<template>
    <el-row class="jd-link__wrap" :justify="justify">
        <el-button :type="type" :size="size" :style="customStyle" @click="handleClick">{{ title }}</el-button>
    </el-row>
</template>

<script>
export default {
    name: 'jdLink',
    props: {
        title: {
            type: String,
            default: ''
        },
        to: {
            type: String,
            default: ''
        },
        size: {
            type: String,
            default: 'default'
        },
        type: {
            type: String,
            default: 'default'
        },
        justify: {
            type: String
        },
        customStyle: {
            type: String
        }
    },
    methods: {
        handleClick() {
            window.location.href = this.to;
        }
    }
};
</script>

<style lang="scss">
.jd-link__wrap {
    width: 100%;
}
</style>
